﻿using InventoryIssue.Domain;
using InventoryIssue.ErrorCode;
using MediatR;
using System.ComponentModel.DataAnnotations;

namespace InventoryIssue.API.Write.Application.Command.Stocktaking
{
    public class CreateStocktakingCommand : IRequest<APIResult<int>>
    {
        /// <summary>
        /// 盘点单号
        /// </summary>
        [Required(ErrorMessage = "盘点单号不能为空")]
        public string StocktakingId { get; set; }
        /// <summary>
        /// 盘点类型
        /// </summary>
        [Required(ErrorMessage = "盘点类型不能为空")]
        public int StocktakingType { get; set; }
        /// <summary>
        /// 关联订单号
        /// </summary>
        [Required(ErrorMessage = "关联订单号不能为空")]
        public string OrderNumber { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [Required(ErrorMessage = "备注不能为空")]
        public string Note { get; set; }
        /// <summary>
        /// 制单人
        /// </summary>
        public string OrderCreator { get; set; }
        /// <summary>
        /// 制单时间
        /// </summary>
        public DateTime OrderCreatorTime { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public int State { get; set; } = 0;
        public List<StocktakingProductModel> Products { get; set; }
    }
}
